//
//  NRWCarDetailAlertView.m
//  NRWMall
//
//  Created by 张记 on 2018/5/23.
//  Copyright © 2018年 com.anpxd. All rights reserved.
//

#import "NRWCarDetailAlertView.h"

@interface NRWCarDetailAlertView ()
@end

@implementation NRWCarDetailAlertView


- (instancetype)initWithType:(PopUpViewType)type carModel:(CarResult *)result{
    if (self = [super init]) {
    
        [self configWithType:type carModel:result];
    }
    return self;
}


- (void)configWithType:(PopUpViewType)type carModel:(CarResult *)result{
    _popType = type;
    
    switch (type) {
        case PopType_InputPhone:
            self.numView.carModel = result;
            [self configNoButtonView:self.numView];
            break;
            
        default:
            break;
    }
}

- (void)configNoButtonView:(UIView *)view {
    [self addSubview:view];
    self.bounds = view.bounds;
}

-(NRWCarInputNumView *)numView{
    if (_numView == nil) {
        _numView = [NRWCarInputNumView InputNumView];
        kSelfWeak;
        _numView.clickBlock = ^{
            weakSelf.basePopUpViewBlock(nil);
        };
    }
    return _numView;
}
@end
